import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpClientModule } from '@angular/common/http';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ReactiveFormsModule } from '@angular/forms';
import { FormsModule } from '@angular/forms';

/** http拦截器 */
import { httpInterceptorProviders } from 'src/app/interceptor/index';

/** 自定义组件 */
import { LoginComponent } from './page/login/login.component';
import { MainComponent } from './page/main/main.component';
import { SiteSummaryComponent } from './page/main/site-summary/site-summary.component';
import { PageNotFoundComponent } from './page/main/page-not-found/page-not-found.component';
import { SiteListComponent } from './page/main/site-list/site-list.component';
import { StartStopComponent } from './page/main/start-stop/start-stop.component';
import { SiteConfigComponent } from './page/main/site-config/site-config.component';
import { VsChartComponent } from './components/vs-chart/vs-chart.component';
import { BatteryEqComponent } from './components/battery-eq/battery-eq.component';



/** echarts图表 */
import { NgxEchartsModule } from 'ngx-echarts';




/** Material 组件 */
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatButtonModule } from '@angular/material/button';
import { LayoutModule } from '@angular/cdk/layout';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatIconModule } from '@angular/material/icon';
import { MatListModule } from '@angular/material/list';
import { MatMenuModule } from '@angular/material/menu';
import { MatTableModule } from '@angular/material/table';
import { MatChipsModule } from '@angular/material/chips';
import { MatTabsModule } from '@angular/material/tabs';
import { MatGridListModule } from '@angular/material/grid-list';
import { MatTreeModule } from '@angular/material/tree';
import { MatCardModule } from '@angular/material/card';
import { MatDatepickerModule } from '@angular/material/datepicker';
/** 日期选择器需要引入该模块 */
import { MatNativeDateModule } from '@angular/material/core';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';






@NgModule({
  declarations: [
    AppComponent,
    LoginComponent,
    MainComponent,
    SiteSummaryComponent,
    PageNotFoundComponent,
    SiteListComponent,
    StartStopComponent,
    SiteConfigComponent,
    VsChartComponent,
    BatteryEqComponent,
  ],
  imports: [
    BrowserModule,
    FormsModule,
    AppRoutingModule,
    BrowserAnimationsModule,
    ReactiveFormsModule,
    HttpClientModule,
    MatFormFieldModule,
    MatInputModule,
    MatButtonModule,
    LayoutModule,
    MatToolbarModule,
    MatSidenavModule,
    MatIconModule,
    MatListModule,
    MatMenuModule,
    MatTableModule,
    MatChipsModule,
    NgxEchartsModule.forRoot({
      /**
       * This will import all modules from echarts.
       * If you only need custom modules,
       * please refer to [Custom Build] section.
       */
      echarts: () => import('echarts'), // or import('./path-to-my-custom-echarts')
    }),
    MatTabsModule,
    MatGridListModule,
    MatTreeModule,
    MatCardModule,
    MatDatepickerModule,
    MatNativeDateModule,
    MatProgressBarModule,
    MatSnackBarModule
  ],
  providers: [
    httpInterceptorProviders,
    { provide: MAT_SNACK_BAR_DEFAULT_OPTIONS, useValue: { duration: 2500 } }
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
